#!/usr/local/bin/python3
# -*- coding:utf8 -*-
# Author Aaron 
# 2017-05-11 21:58:48
import socket


def run_client():
    HOST = '192.168.1.7'
    PORT = 9999
    client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)  # 默认也是这些参数
    client.connect((HOST, PORT))
    # client.send("客户端发送至服务端".encode("utf-8"))
    client.send("1".encode("utf-8"))
    msg = client.recv(1024)
    print("msg:", msg.decode("utf-8"))
    print("len:", len(msg))


if __name__ == '__main__':
    run_client()
